module.exports = app => {
  const mongoose = require('mongoose')
  
  mongoose.connect('mongodb://galaxy:123456@localhost:27017/node_vue_wzry', {
    useNewUrlParser: true,
    useUnifiedTopology: true,
    useFindAndModify: false
  }).then(() => console.log('数据库连接成功')).catch((err) => console.log(err))

  require('require-all')(__dirname + '/../models')
}